//
//  DHDoctorCollectionViewCell.m
//  DHKuaiYi
//
//  Created by 韩旭 on 16/11/13.
//  Copyright © 2016年 30-陈辉华. All rights reserved.
//

#import "DHDoctorCollectionViewCell.h"
#import "Masonry.h"
@interface DHDoctorCollectionViewCell ()

@end

@implementation DHDoctorCollectionViewCell

- (void)awakeFromNib {
   [super awakeFromNib];
    [self setupUI];
}

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self setupUI];
    }
    return self;
}

/**
 初始化
 */
- (void)setupUI {
    UIImageView *imageView = [[UIImageView alloc]init];
    self.imageView =imageView;
    self.imageView.image= [UIImage imageNamed:@"1.jpg"];
    [self addSubview:imageView];
    CGSize imgSize = CGSizeMake(50, 50);
    
    UILabel *label=[[UILabel alloc]init];
    self.label = label;
    self.label.text =@"肿瘤";
    self.label.font = [UIFont systemFontOfSize:20];
    self.label.textColor = [UIColor XHH_colorWithHex:0x5e5e5e];
    [self addSubview:label];

    //自动布局
   [imageView mas_makeConstraints:^(MASConstraintMaker *make) {
       make.top.mas_equalTo(self.contentView).offset(15);
       make.left.mas_equalTo(self.contentView).offset(30);
       make.size.mas_equalTo(imgSize);
   }];
    [label mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.imageView).offset(50);
        make.left.mas_equalTo(self).offset(30);
    }];
       }
@end













